import { S } from '../../s';
import { IPSApplication } from '../../app/ipsapplication';
import { IPSAppWF } from '../../app/wf/ipsapp-wf';
import { IPSDELogic } from './ipsdelogic';
import { IPSDELogicParam } from './ipsdelogic-param';
import { IPSDEStartWFLogic } from './ipsdestart-wflogic';
import { PSDELogicNodeImpl } from './psdelogic-node-impl';

export class PSDEStartWFLogicImpl
  extends PSDELogicNodeImpl
  implements IPSDEStartWFLogic
{
  protected dstpsdelogicparam: IPSDELogicParam;
  getDstPSDELogicParam(): IPSDELogicParam | null {
    if (this.dstpsdelogicparam != null) return this.dstpsdelogicparam;
    const value = this.M.getDstPSDELogicParam;
    if (value == null) {
      return;
    }
    const ipsdelogic = this.getParentPSModelObject(S._200) as IPSDELogic;
    if (ipsdelogic != null) {
      this.dstpsdelogicparam = ipsdelogic.findPSDELogicParam(value);
    }
    return this.dstpsdelogicparam;
  }

  protected psappwf: IPSAppWF;
  getPSAppWF(): IPSAppWF | null {
    if (this.psappwf != null) return this.psappwf;
    const value = this.M.getPSAppWF;
    if (value == null) {
      return;
    }
    const ipsapplication = this.getParentPSModelObject(
      S._26e,
    ) as IPSApplication;
    if (ipsapplication != null) {
      this.psappwf = ipsapplication.findPSAppWF(value);
    }
    return this.psappwf;
  }
  get cls(): string {
    return 'PSDEStartWFLogicImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._37a) return true;
    return super.instanceof(cls);
  }
}
